package com.mrd.gtimp.business.entity;

import com.mrd.gtimp.base.entity.Company;
import com.mrd.gtimp.base.entity.User;

import org.hibernate.annotations.GenericGenerator;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;

@Entity(name = "T_BIZ_DECLARATION_INFORM_MODEL")
public class DeclarationModelInform implements Serializable {
	private static final long	serialVersionUID	= 1L;

	@Id
	@GeneratedValue(generator = "paymentableGenerator")
	@GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
	@Column(name = "ID")
	private String	          id;
	/**
	 * 相关报关业务
	 */
	@OneToOne
	@JoinColumn(name = "BIZ_ID",updatable=false)
	private DeclarationModel	      declaration;
	/**
	 * 提醒发出者，客户帐号
	 */
	@ManyToOne
	@JoinColumn(name = "CREATOR_ID",updatable=false)
	private User	          creator;
	/**
	 * 提醒确认接收人，供应商用户
	 */
	@ManyToOne
	@JoinColumn(name = "CONFIRMER_ID")
	private User	          confirmer;
	/**
	 * 提醒创建时间
	 */
	@Column(name = "CREATE_TIME", updatable = false)
	private Date	          createTime;
	/**
	 * 提醒确认时间
	 */
	@Column(name = "CONFIRM_TIME")
	private Date	          confirmTime;
	/**
	 * 客户公司
	 */
	@ManyToOne
	@JoinColumn(name = "CUSTOMER_COM_ID",updatable=false)
	private Company	          customerCompany;
	/**
	 * 供应商公司
	 */
	@ManyToOne
	@JoinColumn(name = "SUP_COM_ID",updatable=false)
	private Company	          supCompany;
	/**
	 * 确认接收状态，0未确认，1已确认
	 */
	@Column(name = "CONFIRM_STATE")
	private String	          confirmState;
	/**
	 * 确认接收人拓展信息
	 */
	@Column(name = "CONFIRMER_EXT")
	private String	          confirmerExt;
	/**
	 * 备注，250汉字长度限制
	 */
	@Column(name = "REMARK")
	private String	          remark;

	public DeclarationModelInform(DeclarationInform declarationInform){
		/*this.id=declarationInform.getId();*/
		/*this.declaration=new DeclarationModel(declarationInform.getDeclaration());*/
		this.creator=declarationInform.getCreator();
		this.confirmer=declarationInform.getConfirmer();
		this.createTime=declarationInform.getCreateTime();
		this.confirmTime=declarationInform.getConfirmTime();
		this.customerCompany=declarationInform.getCustomerCompany();
		this.supCompany=declarationInform.getSupCompany();
		this.confirmState=declarationInform.getConfirmState();
		this.confirmerExt=declarationInform.getConfirmerExt();
		this.remark=declarationInform.getRemark();
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public User getCreator() {
		return creator;
	}

	public void setCreator(User creator) {
		this.creator = creator;
	}

	public User getConfirmer() {
		return confirmer;
	}

	public void setConfirmer(User confirmer) {
		this.confirmer = confirmer;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date create_time) {
		this.createTime = create_time;
	}

	public Date getConfirmTime() {
		return confirmTime;
	}

	public void setConfirmTime(Date confirm_time) {
		this.confirmTime = confirm_time;
	}

	public Company getCustomerCompany() {
		return customerCompany;
	}

	public void setCustomerCompany(Company customer_company) {
		this.customerCompany = customer_company;
	}

	public Company getSupCompany() {
		return supCompany;
	}

	public void setSupCompany(Company sup_company) {
		this.supCompany = sup_company;
	}

	public String getConfirmState() {
		return confirmState;
	}

	public void setConfirmState(String confirm_state) {
		this.confirmState = confirm_state;
	}

	public String getConfirmerExt() {
		return confirmerExt;
	}

	public void setConfirmerExt(String confirmer_ext) {
		this.confirmerExt = confirmer_ext;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public DeclarationModel getDeclaration() {
		return declaration;
	}

	public void setDeclaration(DeclarationModel declaration) {
		this.declaration = declaration;
	}

}
